import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../controllers/wallet_controller.dart';
import '../widgets/balance_card.dart';
import '../widgets/withdrawal_tabs.dart';
import '../widgets/withdrawal_list.dart';

class WalletPage extends StatelessWidget {
  const WalletPage({super.key});

  @override
  Widget build(BuildContext context) {
    // 初始化钱包控制器
    Get.put(WalletController());

    return Container(
      decoration: BoxDecoration(
        image: DecorationImage(
          image: AssetImage("assets/images/pic_contract_bg.png"),
          fit: BoxFit.fill,
        ),
      ),
      child: Stack(
        children: [
          Image.asset("assets/images/pic_wallet_top.png", fit: BoxFit.fill),
          SingleChildScrollView(
            child: Column(
              children: [
                SafeArea(child: Container()),

                // 余额卡片组件
                const BalanceCard(),

                // // 增长统计组件
                // const GrowthStats(),

                // // 动画测试组件（调试用）
                // const AnimationTest(),

                // 提现历史标签组件
                const WithdrawalTabs(),

                // 提现记录列表组件
                const WithdrawalList(),

                SizedBox(height: 20.h),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
